package day2;

import java.util.Scanner;

public class Test12 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        System.out.print("请输入是否是会员(y/n):");
        String isVip = input.next();
        System.out.print("请输入购物金额:");
        double money = input.nextDouble();
        double discount = 1.0; // 折扣
        if ("y".equals(isVip)) {
            discount = money >= 200 ? .75 : .8;
        } else {
            if (money >= 100) discount = .9;
        }
        System.out.println("实际支付:" + discount * money);
    }
}
